package com.team.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 开药明细表
 * @TableName prescription_detail
 */
@TableName(value ="prescription_detail")
public class PrescriptionDetail implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 药方表主键ID
     */
    private Long prescriptionId;

    /**
     * 挂号单表主键ID
     */
    private Long registryId;

    /**
     * 药品表主键ID
     */
    private Long drugId;

    /**
     * 病人表主键ID
     */
    private Long patientId;

    /**
     * 药品数量
     */
    private Integer amount;

    /**
     * 是否是医保用药 1-->不是医保用药，2-->是医保用药
     */
    private Integer isMedicare;

    /**
     * 药品原始价格
     */
    private BigDecimal price;

    /**
     * 实际支付价格
     */
    private BigDecimal payPrice;

    /**
     * 医保报销金额
     */
    private BigDecimal medicarePrice;

    /**
     * 创建时间
     */
    private Date createdTime;

    /**
     * 修改时间
     */
    private Date updatedTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Long getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 药方表主键ID
     */
    public Long getPrescriptionId() {
        return prescriptionId;
    }

    /**
     * 药方表主键ID
     */
    public void setPrescriptionId(Long prescriptionId) {
        this.prescriptionId = prescriptionId;
    }

    /**
     * 挂号单表主键ID
     */
    public Long getRegistryId() {
        return registryId;
    }

    /**
     * 挂号单表主键ID
     */
    public void setRegistryId(Long registryId) {
        this.registryId = registryId;
    }

    /**
     * 药品表主键ID
     */
    public Long getDrugId() {
        return drugId;
    }

    /**
     * 药品表主键ID
     */
    public void setDrugId(Long drugId) {
        this.drugId = drugId;
    }

    /**
     * 病人表主键ID
     */
    public Long getPatientId() {
        return patientId;
    }

    /**
     * 病人表主键ID
     */
    public void setPatientId(Long patientId) {
        this.patientId = patientId;
    }

    /**
     * 药品数量
     */
    public Integer getAmount() {
        return amount;
    }

    /**
     * 药品数量
     */
    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    /**
     * 是否是医保用药 1-->不是医保用药，2-->是医保用药
     */
    public Integer getIsMedicare() {
        return isMedicare;
    }

    /**
     * 是否是医保用药 1-->不是医保用药，2-->是医保用药
     */
    public void setIsMedicare(Integer isMedicare) {
        this.isMedicare = isMedicare;
    }

    /**
     * 药品原始价格
     */
    public BigDecimal getPrice() {
        return price;
    }

    /**
     * 药品原始价格
     */
    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    /**
     * 实际支付价格
     */
    public BigDecimal getPayPrice() {
        return payPrice;
    }

    /**
     * 实际支付价格
     */
    public void setPayPrice(BigDecimal payPrice) {
        this.payPrice = payPrice;
    }

    /**
     * 医保报销金额
     */
    public BigDecimal getMedicarePrice() {
        return medicarePrice;
    }

    /**
     * 医保报销金额
     */
    public void setMedicarePrice(BigDecimal medicarePrice) {
        this.medicarePrice = medicarePrice;
    }

    /**
     * 创建时间
     */
    public Date getCreatedTime() {
        return createdTime;
    }

    /**
     * 创建时间
     */
    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    /**
     * 修改时间
     */
    public Date getUpdatedTime() {
        return updatedTime;
    }

    /**
     * 修改时间
     */
    public void setUpdatedTime(Date updatedTime) {
        this.updatedTime = updatedTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PrescriptionDetail other = (PrescriptionDetail) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPrescriptionId() == null ? other.getPrescriptionId() == null : this.getPrescriptionId().equals(other.getPrescriptionId()))
            && (this.getRegistryId() == null ? other.getRegistryId() == null : this.getRegistryId().equals(other.getRegistryId()))
            && (this.getDrugId() == null ? other.getDrugId() == null : this.getDrugId().equals(other.getDrugId()))
            && (this.getPatientId() == null ? other.getPatientId() == null : this.getPatientId().equals(other.getPatientId()))
            && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
            && (this.getIsMedicare() == null ? other.getIsMedicare() == null : this.getIsMedicare().equals(other.getIsMedicare()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getPayPrice() == null ? other.getPayPrice() == null : this.getPayPrice().equals(other.getPayPrice()))
            && (this.getMedicarePrice() == null ? other.getMedicarePrice() == null : this.getMedicarePrice().equals(other.getMedicarePrice()))
            && (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime()))
            && (this.getUpdatedTime() == null ? other.getUpdatedTime() == null : this.getUpdatedTime().equals(other.getUpdatedTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPrescriptionId() == null) ? 0 : getPrescriptionId().hashCode());
        result = prime * result + ((getRegistryId() == null) ? 0 : getRegistryId().hashCode());
        result = prime * result + ((getDrugId() == null) ? 0 : getDrugId().hashCode());
        result = prime * result + ((getPatientId() == null) ? 0 : getPatientId().hashCode());
        result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
        result = prime * result + ((getIsMedicare() == null) ? 0 : getIsMedicare().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getPayPrice() == null) ? 0 : getPayPrice().hashCode());
        result = prime * result + ((getMedicarePrice() == null) ? 0 : getMedicarePrice().hashCode());
        result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
        result = prime * result + ((getUpdatedTime() == null) ? 0 : getUpdatedTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", prescriptionId=").append(prescriptionId);
        sb.append(", registryId=").append(registryId);
        sb.append(", drugId=").append(drugId);
        sb.append(", patientId=").append(patientId);
        sb.append(", amount=").append(amount);
        sb.append(", isMedicare=").append(isMedicare);
        sb.append(", price=").append(price);
        sb.append(", payPrice=").append(payPrice);
        sb.append(", medicarePrice=").append(medicarePrice);
        sb.append(", createdTime=").append(createdTime);
        sb.append(", updatedTime=").append(updatedTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}